<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>森海塞尔</title>
  <script src="./js/template-web.js"></script>
  <script src="./js/ajax.js"></script>
  <link rel="stylesheet" href="./css/cart.css">
</head>

<body>

  <!-- 头部 -->
  <header>
    <div>
      <div>
        <a href="/"><img src="./images/index/jianjian-logo.png"></a>
      </div>
      <div class="nav">
        <div class="point liner active">
          <a href="javascript:;">我的购物车</a>
        </div>
        <div class="point liner">
          <a href="javascript:;">填写核对订单</a>
        </div>
        <div class="point">
          <a href="javascript:;">成功提交订单</a>
        </div>
      </div>
    </div>
  </header>

  <div class="container">
    <p class="ft-sz">购物车</p>
    <div class="header">
      <script id="cart" type="text/html">
        {{if user!='' && cart!=''}}
        {{each cart}}
        <div class="main">
          <input type="hidden" value="{{$value.cart_id}}">
          <img src="{{$value.img1}}">
          <p>{{$value.pname}}</p>
          <span class="prices">¥{{$value.price}}</span>
          <div class="btn">
            <button class="btns">-</button>
            <span>{{$value.pnum}}</span>
            <button class="btns">+</button>
          </div>
          <a href="javascript:;" onclick="cart_delete({{$value.cart_id}})"><img src="./images/login/垃圾桶.png"></a>
        </div>
        {{/each}}
        <div class="jiesuan">
          <a href="javascript:;" onclick="go_buy()">立即结算</a>
          <span id="zongjia">¥{{allPrice}}</span>
          <p>合计：</p>
        </div>
        {{else if user!='' && cart==''}}
        <div class="demo">
          <img src="./images/login/icon-16.png" alt="">
          <p>您的购物车里什么都没有哦~</p>
          <a style="margin-top: 2rem;" href="/list.html">去逛一逛</a>
        </div>
        {{else}}
        <div class="demo">
          <img src="./images/login/icon-16.png">
          <p>您的购物车里什么都没有哦~</p>
          <a href="/login.html">立即登录</a>
          <a href="/list.html">去逛一逛</a>
        </div>
        {{/if}}
      </script>
    </div>

    <p class="ft-sz">推荐商品</p>
    <div class="dis-fx">
      <div>
        <a href="#"><img src="./images/login/01 (1).png"></a>
        <a href="#">
          <p>IE 100 PRO蓝牙套装</p>
        </a>
        <a href="#">¥1,499</a>
      </div>
      <div>
        <a href="#"><img src="./images/login/ietw2b.png"></a>
        <a href="#">
          <p>MOMENTUM 真无线二代 HIFI入耳式耳机 黑色</p>
        </a>
        <div>
          <a href="#"><img src="./images/login/22.png"></a>
          <a href="#"><img src="./images/login/33.png"></a>
        </div>
        <a href="#">¥2,199</a>
      </div>
      <div>
        <a href="#"><img src="./images/login/M33-1.png" alt=""></a>
        <a href="#">
          <p>MOMENTUM Wireless蓝牙无线包耳式耳机 白色</p>
        </a>
        <div>
          <a href="#"><img class="img-w-100" src="./images/login/44.png"></a>
          <a href="#"><img class="img-w-100" src="./images/login/55.png"></a>
        </div>
        <a href="#">¥2,999</a>
      </div>
      <div>
        <a href="#"><img src="./images/login/80S-BT-13.png" alt=""></a>
        <a href="#">
          <p>IE 80S BT发烧级高保真蓝牙入耳式耳机</p>
        </a>
        <a href="#">¥2,899</a>
      </div>
      <div>
        <a href="#"><img src="./images/login/HD600.png" alt=""> </a>
        <a href="#">
          <p>HD 600 HiFi专业立体声耳机</p>
        </a>
        <a href="#">¥2,299</a>
      </div>
    </div>
  </div>


  <!-- 尾部 -->
  <iframe src="./footer.html" width="100%" frameborder="0" scrolling="no" height="414px"></iframe>

  <script src="./js/cart.js"></script>
</body>

</html>